<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //1.获取操作
        var nav=document.querySelector('.nav');
        var lis=nav.children;//得到四个li
        //2.循环注册事件
        for(var i=0;i<lis.length;i++){
            lis[i].onmouseover=function(){
                this.children[1].style.dispaly='bolock';
            }
            lis[i].onmouseout=function(){
                this.children[1].style.dispaly='none';
            }
        }
    </script>
</body>
</html>